package com.dayuanit.dy15.lesson29.demo3;

public class Test {

    public static void main(String[] args) {
        //线程之 生产者&消费者模型

        MarCarOrder marCarOrder = new MarCarOrder();

        //生产者线程的任务
        ProducerRunnable producerRunnable = new ProducerRunnable(marCarOrder);
        //消费者线程的任务
        ConsumerRunnable consumerRunnable = new ConsumerRunnable(marCarOrder);


        new Thread(producerRunnable, "Producer").start();
        new Thread(consumerRunnable, "Consumer1").start();
        new Thread(consumerRunnable, "Consumer2").start();

    }
}
